﻿using ConApp.dependency;
using Microsoft.Diagnostics.Tracing.Parsers.Kernel;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Renci.SshNet;
using System.Diagnostics;

namespace ConApp
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //int x = 1;
            //Interlocked.Add(ref x, 2);
            //Console.WriteLine(x);
            //Console.ReadLine();

            //var summary = BenchmarkRunner.Run<Bench>();


            //using var root = new ServiceCollection()
            //    .AddTransient<IFoo, Foo>()
            //    .AddScoped<IBar>(_ => new Bar())
            //    .AddSingleton<IBaz, Baz>()
            //    .BuildServiceProvider();

            //using var scope = root.CreateScope();
            //var provider = scope.ServiceProvider;
            //provider.GetRequiredService<IBaz>();
            //provider.GetRequiredService<IBar>();
            //provider.GetRequiredService<IFoo>();
            //Console.WriteLine("Child container is disposed.");


            //Console.WriteLine("Root container is disposed.");


            using var client = new SshClient("192.164.18.73", 52189, "42EE98", "Sfqd@2025@06B");
            client.Connect();
            using SshCommand cmd = client.RunCommand("echo 'Hello World!'");
            Console.WriteLine(cmd.Result); // "Hello World!\n"
        }
    }
}
